﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Location.ascx.cs" Inherits="Admin_Components_MasterData_Location" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<telerik:RadScriptManager ID="ScriptManager2" runat="server" EnableTheming="True"></telerik:RadScriptManager>

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<telerik:radformdecorator id="QsfFromDecorator" runat="server" decoratedcontrols="All"
            enableroundedcorners="false" />
        <telerik:RadTabStrip ID="TabStrip1" runat="server" EnableDragToReorder="true" Skin="Vista" MultiPageID="RadMultiPag1" SelectedIndex="1">
            <Tabs>
                <telerik:RadTab Text="TẠO MỚI" Selected="True">
                </telerik:RadTab>
                <telerik:RadTab Text="TÌM KIẾM"></telerik:RadTab>
            </Tabs>
        </telerik:RadTabStrip>
        <telerik:RadMultiPage ID="RadMultiPag1" runat="server" SelectedIndex="0">
            <!--Tab thông tin chung -->
            <telerik:RadPageView ID="RadPageView1" runat="server"  Style="overflow: hidden">
                 <fieldset class="form" id="fsGeneral">
                  <br />
                <div class="form-horizontal wrapper-center clearfix">
                <!--Block bên trái -->
                 <div class="form-group col-md-6">
                    
                   <!--Dòng -->
                    <div class="form-group">
                        <label class="col-md-4 control-label">
                           Tỉnh/thành phố</label>
                        <div class="col-md-8">
                            <telerik:RadComboBox ID="cbProvince" runat="server" CssClass="col-imp-5" TabIndex="1"  AllowCustomText="false">
                                <Items></Items>
                            </telerik:RadComboBox>
                           
                        </div>
                    </div>
                  <!--End Dòng -->  
                     
                  <!--Dòng -->
                <div class="form-group">
                    <label class="col-md-4 control-label">Tên</label>
                    <div class="col-md-8">
                        <telerik:RadTextBox ID="txtName" CssClass="col-imp-10 inputForm" Width="40px" runat="server" />
                        <asp:RequiredFieldValidator  ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtName" ValidationGroup="g1"
                           ErrorMessage="Required(*)" InitialValue=""></asp:RequiredFieldValidator>
                     </div>
                </div>
                <!--End Dòng -->
                    
                
                 </div>
                 <!--End Block bên trái -->
                 <!--Block bên phải -->
                <div class="form-group col-md-6">
                    <!--Dòng -->
                     <div class="form-group">
                        <label class="col-md-3 control-label">Người cập nhật</label>
                        <div class="col-md-8">
                           <telerik:RadTextBox ID="txtLastUpdatedBy" CssClass="col-imp-4 inputForm" Width="40px" runat="server"   Enabled ="false"/>
                         </div>
                    </div>
                    <!--End Dòng -->
                     <!--Dòng -->
                     <div class="form-group">
                        <label class="col-md-3 control-label">Ngày cập nhật</label>
                        <div class="col-md-8">
                           <telerik:RadTextBox ID="txtLastUpdatedDateTime" CssClass="col-imp-4 inputForm" Width="40px" runat="server"   Enabled ="false"/>
                         </div>
                    </div>
                    <!--End Dòng -->
                    
                         </div>
                 <!--End Block bên phải -->
            </div>
            </fieldset>
            <!--Action-->
            <div class="set-btns text-center">
                <asp:Button ID="btnSave" CssClass="btn btn-sm btn-primary" runat="server" Text="Lưu"   ValidationGroup="g1"  OnClick="btnSave_Click"/>
                <asp:Button ID="btnCancel" CssClass="btn btn-sm btn-warning" runat="server" Text="Xóa"  OnClientClick="return ConfirmOnDelete('Bạn chắc chắn muốn xóa?')"  OnClick="btnCancel_Click"/>
                <asp:Button ID="btnNew" CssClass="btn btn-sm btn-primary" runat="server" Text="Tạo mới"  OnClick="btnNew_Click"/>
            </div>
            <!--End Action -->
                  </MasterTableView>
                </telerik:RadPageView>
             <!--End Tab thông tin chung -->
            <!--Tim kiem -->
    <telerik:RadPageView ID="RadPageView3" runat="server"  Style="overflow: hidden">
                 <fieldset class="form" id="Fieldset2">
                  <br />
                <div class="form-horizontal wrapper-center clearfix">
                    <!--Block bên trái -->
                 <div class="form-group col-md-6">
                  <!--Dòng -->
                    <div class="form-group">
                        <label class="col-md-3 control-label">
                            Tên</label>
                        <div class="col-md-8">
                            <telerik:RadTextBox ID="txtNameSearch" CssClass="col-imp-8 inputForm" Width="40px" runat="server"  />
                        </div>
                    </div>
                  <!--End Dòng -->
                </div>
                 <!--End Block bên trái -->
                     <!--Block bên phải -->
                <div class="form-group col-md-6">
                    <!--Dòng -->
                    <div class="form-group">
                        <label class="col-md-3 control-label">Từ ngày</label>
                        <div class="col-md-8">
                          <telerik:RadDatePicker ID="rtpFromDateSearch" cssclass="col-imp-8" enabled="true" runat="server" Culture="en-GB"  DateFormat="dd/MM/yyyy" readOnly ="true">
                                <Calendar ID="Calendar3" runat="server" EnableKeyboardNavigation="true" ViewSelectorText="x" Skin="Hay" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False">
                                </Calendar>
                                <DateInput  style="width:200px" DisplayDateFormat="dd/MM/yyyy" DateFormat="dd/MM/yyyy"  readOnly ="true"></DateInput>
                            </telerik:RadDatePicker>
                         </div>
                    </div>
                    <!--End Dòng -->
                    <!--Dòng -->
                    <div class="form-group">
                        <label class="col-md-3 control-label">Đến ngày</label>
                        <div class="col-md-8">
                            <telerik:RadDatePicker ID="rtpToDateSearch" cssclass="col-imp-8" enabled="true" runat="server" Culture="en-GB" DateFormat="dd/MM/yyyy" readOnly ="true">
                                <Calendar ID="Calendar4" runat="server" EnableKeyboardNavigation="true" ViewSelectorText="x" Skin="Hay" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False">
                                </Calendar>
                                <DateInput  style="width:200px" DisplayDateFormat="dd/MM/yyyy" DateFormat="dd/MM/yyyy"  readOnly ="true"></DateInput>
                            </telerik:RadDatePicker>
                         </div>
                    </div>
                    <!--End Dòng -->
                </div>
                 <!--End Block bên phải -->
                </div>
                <!--Button Tim Kiem-->
                 <div class="set-btns text-center">
                     <asp:Button ID="btnSearch" CssClass="btn btn-sm btn-primary" runat="server" OnClick="btnSearch_Click"  Text="Tìm kiếm"  />
                </div> 
                <!--End Button Tim Kiem--> 
                </fieldset>
        <br />
        <!--Grid data-->
         <center>
           <div class="row">
                <div style="float: left;font-weight:bold;width:750px" runat="server" id="div_TotalRows" >Kết quả tìm kiếm: 0</div>
                <br />
                 
            <telerik:radgrid id="gvData" runat="server" cellspacing="0" cssclass=" table table-bordered"
                gridlines="None" autogeneratecolumns="False" headerstyle-horizontalalign="Center" PageSize="10" AllowCustomPaging="true"
                allowmultirowselection="True" headerstyle-borderstyle="None" Height="250"  Width="700px" ShowHeader="true" OnNeedDataSource="gvData_NeedDataSource"  OnItemCommand="gvData_ItemCommand">
                
                <MasterTableView ShowHeader="true" NoMasterRecordsText="Không có dữ liệu." ShowGroupFooter="true" AllowPaging="True" PageSize="10" EditMode="InPlace">
                <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
                 <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
                <Columns>
                    <telerik:GridTemplateColumn HeaderText="STT" HeaderButtonType="TextButton" ItemStyle-HorizontalAlign="Center">
                        <ItemTemplate>
                            <%# Eval("RowID") %></ItemTemplate>
                        <HeaderStyle Width="30px" />
                        <ItemStyle HorizontalAlign="Center" />
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn  DataField="LocationName" UniqueName="LocationName"  ReadOnly="true" HeaderText="Tên">
                        <HeaderStyle HorizontalAlign="Center"  Width="100px" />
                        <ItemStyle HorizontalAlign="Left" />
                    </telerik:GridBoundColumn>
                     <telerik:GridBoundColumn  DataField="ProvinceName" UniqueName="ProvinceName"  ReadOnly="true" HeaderText="Tỉnh/thành phố">
                        <HeaderStyle HorizontalAlign="Center"  Width="100px" />
                        <ItemStyle HorizontalAlign="Left" />
                    </telerik:GridBoundColumn>
                     
                    <telerik:GridTemplateColumn HeaderText="Chi tiết" HeaderButtonType="TextButton" ItemStyle-HorizontalAlign="Center">
                        <ItemTemplate>
                            <asp:Button ID="Button1" CssClass="btnViewDetail" CommandArgument='<%# Eval("LocationID") %>'
                                CommandName="EditItem" runat="server"></asp:Button>
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Center" Width="50px" />
                        <ItemStyle HorizontalAlign="Center" ></ItemStyle>
                    </telerik:GridTemplateColumn>
                    <%--<telerik:GridTemplateColumn HeaderText="Xóa" Visible=true HeaderButtonType="TextButton" ItemStyle-HorizontalAlign="Center">
                        <ItemTemplate>
                            <asp:Button ID="Button2" CssClass="btnX" CommandArgument='<%# Eval("TransferWarehouseID") %>'
                                OnClientClick="return ConfirmOnDelete('Bạn chắc chắn muốn xóa không?')" CommandName="DeleteItem"
                                runat="server"></asp:Button>
                        </ItemTemplate>
                        <HeaderStyle Width="30px"/>
                            <ItemStyle HorizontalAlign="Center" />
                    </telerik:GridTemplateColumn>--%>
               </Columns>
                </MasterTableView>
            </telerik:radgrid>
        </div>
             </center>
            <!--End Grid data--> 
    </telerik:RadPageView>
    <!--End Tab Tim kiem -->
     </telerik:RadMultiPage>
<div style="clear:both"></div>
</ContentTemplate>
</asp:UpdatePanel>

<div class="progressbar">
    <asp:UpdateProgress ID="up" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
        <ProgressTemplate>
            <div class="bg">
                <div class="progress progress-striped active">
                    <div class="progress-bar" role="progressbar" aria-valuenow="45" aria-valuemin="0"
                        aria-valuemax="100" style="width: 100%">
                        <span class="sr-only">100% Complete</span>
                    </div>
                </div>
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>
</div>

